const joi = require('joi');

const username = joi.string().alphanum().min(1).max(10).optional().allow(null);
const email = joi.string().email().required();
const password = joi.string().pattern(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]).{8,24}$/).required();
const verificationCode = joi.string().pattern(/^\d{6}$/);

exports.reg_login_schema = {
    body: {
        username,
        email,
        password,
        verificationCode
    }
}